<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title>超市</title>
        <meta name="description" content="">
        <meta name="keywords" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
        <meta name="renderer" content="webkit">
        <meta http-equiv="Cache-Control" content="no-siteapp" />
        <link rel="icon" type="image/png" href="/theme/default/images/favicon.png">
		<link href="css/amazeui.min.css" rel="stylesheet" type="text/css" />
		<link href="css/style.css" rel="stylesheet" type="text/css" />
		<link href="css/check.css" rel="stylesheet" type="text/css" />
		<script src="js/jquery-1.10.2.min.js"></script>
	</head>
	<body>
		<header data-am-widget="header" class="am-header am-header-default sq-head ">
			<div class="am-header-left am-header-nav">
				<a href="javascript:history.back()" class="">
					<i class="am-icon-chevron-left"></i>
				</a>
			</div>
			<h1 class="am-header-title">
  	            <a href="" class="">我的收藏</a>
            </h1>
            <div class="am-header-right am-header-nav">
			    <a href="collect-edit.html" class="">
		        编辑
		        </a>
			</div>
	    </header>
	    <div style="height: 49px;"></div>
	   <ul class="list-pro" style="margin-top: 0;">
	    	<li>
	    		<a href="detail.html"><img src=" images/test10.png" class="list-pic" /></a>
	    		<div class="shop-list-mid" style="width: 65%;">
                	<div class="tit"><a href="detail.html">法国加力果12个装 进口新鲜水果 嘎啦苹果 包邮</a></div>
                	<div class="am-gallery-desc">￥52</div>
                	<p>销量：5件</p>
                </div>
                <div class="list-cart">
	                <div class="d-stock ">
			                <a class="decrease">-</a>
			                <input id="num" readonly="" class="text_box" name="" type="text" value="0">
			                <a class="increase">+</a>
	                </div>
                </div>
                <!--<a href="" class="list-cart"><img src="images/cart.png" width="30"/></a>-->
	    	</li>
	    	<li>
	    		<a href="detail.html"><img src=" images/test10.png" class="list-pic" /></a>
	    		<div class="shop-list-mid" style="width: 65%;">
                	<div class="tit"><a href="detail.html">法国加力果12个装 进口新鲜水果 嘎啦苹果 包邮</a></div>
                	<div class="am-gallery-desc">￥52</div>
                	<p>销量：5件</p>
                </div>
                <div class="list-cart">
                <div class="d-stock ">
		                <a class="decrease">-</a>
		                <input id="num" readonly="" class="text_box" name="" type="text" value="0">
		                <a class="increase">+</a>
                </div>
                </div>
                <!--<a href="" class="list-cart"><img src="images/cart.png" width="30"/></a>-->
	    	</li>
	    	<li>
	    		<a href="detail.html"><img src=" images/test10.png" class="list-pic" /></a>
	    		<div class="shop-list-mid" style="width: 65%;">
                	<div class="tit"><a href="detail.html">法国加力果12个装 进口新鲜水果 嘎啦苹果 包邮</a></div>
                	<div class="am-gallery-desc">￥52</div>
                	<p>销量：5件</p>
                </div>
                <div class="list-cart">
                <div class="d-stock ">
		                <a class="decrease">-</a>
		                <input id="num" readonly="" class="text_box" name="" type="text" value="0">
		                <a class="increase">+</a>
                </div>
                </div>
                <!--<a href="" class="list-cart"><img src="images/cart.png" width="30"/></a>-->
	    	</li>
	    	<li>
	    		<a href="detail.html"><img src=" images/test10.png" class="list-pic" /></a>
	    		<div class="shop-list-mid" style="width: 65%;">
                	<div class="tit"><a href="detail.html">法国加力果12个装 进口新鲜水果 嘎啦苹果 包邮</a></div>
                	<div class="am-gallery-desc">￥52</div>
                	<p>销量：5件</p>
                </div>
                <div class="list-cart">
                <div class="d-stock ">
		                <a class="decrease">-</a>
		                <input id="num" readonly="" class="text_box" name="" type="text" value="0">
		                <a class="increase">+</a>
                </div>
                </div>
                <!--<a href="" class="list-cart"><img src="images/cart.png" width="30"/></a>-->
	    	</li>
	    	<li>
	    		<a href="detail.html"><img src=" images/test10.png" class="list-pic" /></a>
	    		<div class="shop-list-mid" style="width: 65%;">
                	<div class="tit"><a href="detail.html">法国加力果12个装 进口新鲜水果 嘎啦苹果 包邮</a></div>
                	<div class="am-gallery-desc">￥52</div>
                	<p>销量：5件</p>
                </div>
                <div class="list-cart">
                <div class="d-stock ">
		                <a class="decrease">-</a>
		                <input id="num" readonly="" class="text_box" name="" type="text" value="0">
		                <a class="increase">+</a>
                </div>
                </div>
                <!--<a href="" class="list-cart"><img src="images/cart.png" width="30"/></a>-->
	    	</li>
	    	<li>
	    		<a href="detail.html"><img src=" images/test10.png" class="list-pic" /></a>
	    		<div class="shop-list-mid" style="width: 65%;">
                	<div class="tit"><a href="detail.html">法国加力果12个装 进口新鲜水果 嘎啦苹果 包邮</a></div>
                	<div class="am-gallery-desc">￥52</div>
                	<p>销量：5件</p>
                </div>
                <div class="list-cart">
                <div class="d-stock ">
		                <a class="decrease">-</a>
		                <input id="num" readonly="" class="text_box" name="" type="text" value="0">
		                <a class="increase">+</a>
                </div>
                </div>
                <!--<a href="" class="list-cart"><img src="images/cart.png" width="30"/></a>-->
	    	</li>
	    	<li>
	    		<a href="detail.html"><img src=" images/test10.png" class="list-pic" /></a>
	    		<div class="shop-list-mid" style="width: 65%;">
                	<div class="tit"><a href="detail.html">法国加力果12个装 进口新鲜水果 嘎啦苹果 包邮</a></div>
                	<div class="am-gallery-desc">￥52</div>
                	<p>销量：5件</p>
                </div>
                <div class="list-cart">
                <div class="d-stock ">
		                <a class="decrease">-</a>
		                <input id="num" readonly="" class="text_box" name="" type="text" value="0">
		                <a class="increase">+</a>
                </div>
                </div>
                <!--<a href="" class="list-cart"><img src="images/cart.png" width="30"/></a>-->
	    	</li>
	    	
	    </ul>
	    <!--底部-->
 <div style="height: 55px;"></div>
 <div data-am-widget="navbar" class="am-navbar am-cf am-navbar-default sq-foot am-no-layout" id="">
      <ul class="am-navbar-nav am-cf am-avg-sm-5">   
          <li>
            <a href="{% url 'goods:超市主页' %}" class="">
                <span class="am-icon-home"></span>
                <span class="am-navbar-label">首页</span>
            </a>
          </li>
          <li>
            <a href="message.html" class="">
                <span class="am-icon-comments"></span>
                <span class="am-navbar-label">动态</span>
            </a>
          </li>
          <li>
            <a href="{% url 'shopcart:购物车' %}" class="">
                <span class="am-icon-shopping-cart"></span>
                <span class="am-navbar-label">购物车</span>
            </a>
          </li>
          <li>
            <a href="{% url 'orders:订单' %}" class="">
                <span class="am-icon-file-text"></span>
                <span class="am-navbar-label">订单</span>
            </a>
          </li>
 
          <li>
            <a href="{% url 'user:个人中心' %}" class="curr">
                <span class="am-icon-user"></span>
                <span class="am-navbar-label">我的</span>
            </a>
          </li>
      </ul>
</div>
<script>
//购物数量加减
$(function(){
		$('.increase').click(function(){
			var self = $(this);
			var current_num = parseInt(self.siblings('input').val());
			current_num += 1;
			if(current_num > 0){
				self.siblings(".decrease").fadeIn();
				self.siblings(".text_box").fadeIn();
			}
			self.siblings('input').val(current_num);
			update_item(self.siblings('input').data('item-id'));
		})		
		$('.decrease').click(function(){
			var self = $(this);
			var current_num = parseInt(self.siblings('input').val());
			if(current_num > 0){
				current_num -= 1;
                if(current_num < 1){
	                self.fadeOut();
					self.siblings(".text_box").fadeOut();
                }
				self.siblings('input').val(current_num);
				update_item(self.siblings('input').data('item-id'));
			}
		})
	})

</script>
	</body>
</html>
